<form class="form-horizontal" method="post">
	
	<input type="hidden" name="action" value="modify_comment" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />

	<div class="control-group">
		<label class="control-label">게시판</label>
		<div class="controls">
<?php if ( isset($result['article']) && $result['article'] != "" ) : ?>
			<?php echo $result['article']['board_id'] ?>
<?php else : ?>
			삭제됨
<?php endif; ?>
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label">원본글</label>
		<div class="controls">
<?php if ( isset($result['article']) && $result['article'] != "" ) : ?>
			<?php echo $result['article']['subject'] ?> (<?php echo $result['data_idx']?>번글) <a href="<?php echo $href."/".$kong->id."/article/".$result['data_idx']?>" class="btn">바로가기</a>
<?php else : ?>
			삭제됨
<?php endif; ?>
		</div>
	</div>

	<div class="control-group">
		<label class="control-label" for="writer">글쓴이</label>
		<div class="controls">
			<input type="text" name="writer" id="writer" required="1" autofocus="1" value="<?php echo $result['writer']?>" />
		</div>
	</div>

	<div class="control-textarea">
		<textarea name="contents" id="contents" class="redactor" data-imageup="http://<?php echo HOME?>/redactor/image" data-fileup="http://<?php echo HOME?>/redactor/file"><?php echo htmlspecialchars($result['contents']) ?></textarea>
	</div>

<?php if ( isset($result['option']) && $result['option'] != "" ) : ?>
	<div class="control-group">
		<label class="control-label" for="subject">Options</label>
		<div class="controls"><span class="help-block"><?php echo htmlspecialchars(($result['option'])) ?></span></div>
	</div>

<?php endif ?>
<?php if ( isset($result['files']) && $result['files'] != "" ) : ?>
	<div class="control-group">
		<label class="control-label" for="subject">Files</label>
		<div class="controls"><span class="help-block"><?php echo htmlspecialchars(($result['files'])) ?></span></div>
	</div>

<?php endif ?>

	<div class="control-group">
		<div class="controls pull-right">
			<button type="submit" name="submit" id="submit" class="btn btn-warning">Modify</button>
			<a data-toggle="modal" href="#myDelete" class="btn">Delete</a>
		</div>
	</div>

</form>

<form class="form-horizontal" method="post">
	<input type="hidden" name="action" value="delete_comment" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />
	
	<div id="myDelete" class="modal hide fade">
		<div class="modal-header">
			<button type="button" data-dismiss="modal" class="close">&times;</button>
			<h4>정말로 삭제합니까?</h4>
		</div>
		<div class="modal-body"><p>한번 삭제하면 다시는 돌이킬 수 없습니다.</p></div>
		<div class="modal-footer">
			<a href="#" data-dismiss="modal" class="btn">닫기</a>
			<button type="submit" class="btn btn-warning">삭제</button>
		</div>
	</div>
</form>

<script>
var category = <?php echo json_encode($category); ?>;
</script>



